/**
 * 							RTC Common Defination
 * @brief	RTC Common Definaton
 * @author	chy.
 * @note
 * @comment	this file defines macros and functions used by kernel, we'd batter make it has less thing with platform!
 */

#ifndef	_K_DRIV_RTC_H_
#define	_K_DRIV_RTC_H_

typedef	struct k_tag_time
{
	unsigned short	year;		// base from 0
	unsigned short	month;
	unsigned short	day;
	unsigned short	week;
	unsigned short	hours;
	unsigned short	min;
	unsigned short	sec;
	unsigned short	milionsec;
}K_Time;

/**
 * @BRIEF	:	Initialize RTC
 * @PARAM	:	void
 * @RETURN	:	void
 * @NOTE	:	The hard rtc is different in different platform.
 */
void k_driv_rtc_init(void);

/**
 * @BRIEF	:	Set RTC Value
 * @PARAM	:	time time value
 * @RETURN	:	0 failed, other success
 * @NOTE	:	this function will igore week field in K_Time structure
 */
unsigned int k_driv_rtc_set(K_Time *time);

#endif /* _K_DRIV_RTC_H_ */